package com.yb.socket.service.mqtt;

import com.alibaba.fastjson.JSONObject;
import com.yb.socket.pojo.MqttRequest;
import com.yb.socket.service.SocketType;
import com.yb.socket.service.WrappedChannel;
import com.yb.socket.service.server.Server;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author daoshenzzg@163.com
 * @date 2018/12/30 18:41
 */
public class Mqttunbind {

    private static final Logger logger = LoggerFactory.getLogger(Mqttunbind.class);

    public static void main(String[] args) throws Exception {
        Server server = new Server();
        server.setPort(8000);
        server.setOpenCount(true);
        server.setCheckHeartbeat(true);
        server.setOpenStatus(true);
        server.setOpenExecutor(true);
        server.addEventListener(new EchoMessageEventListener());
        server.setSocketType(SocketType.MQTT);
        server.shutdown();
    }
}
